const config = require('./config/index.js');

module.exports = {
  apps: [
    {
      name: 'sso',
      script: 'bin/sso.js',
      watch: ['src/', 'app.js', 'bin/sso.js'],
      ignore_watch: ['src/router/app.js'],
      env: config.sso,
      env_production: {
        NODE_ENV: 'production',
      },
    },
    {
      name: 'app1',
      script: 'bin/app.js',
      watch: ['src/router/app.js', 'app.js', 'bin/app.js'],
      env: config.app1,
      env_production: {
        NODE_ENV: 'production',
      },
    },
    {
      name: 'app2',
      script: 'bin/app.js',
      watch: ['src/router/app.js', 'app.js', 'bin/app.js'],
      env: config.app2,
      env_production: {
        NODE_ENV: 'production',
      },
    },
  ],

  // deploy : {
  //   production : {
  //     user : 'SSH_USERNAME',
  //     host : 'SSH_HOSTMACHINE',
  //     ref  : 'origin/master',
  //     repo : 'GIT_REPOSITORY',
  //     path : 'DESTINATION_PATH',
  //     'pre-deploy-local': '',
  //     'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production',
  //     'pre-setup': ''
  //   }
  // }
};
